home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / sun / print / PSPrinterJob$PrinterOpener.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.1 KB  |  38 lines

  1. package sun.print;
  2.  
  3. import java.awt.print.PrinterException;
  4. import java.awt.print.PrinterIOException;
  5. import java.io.File;
  6. import java.io.FileOutputStream;
  7. import java.io.IOException;
  8. import java.io.OutputStream;
  9. import java.security.PrivilegedAction;
  10.  
  11. class PSPrinterJob$PrinterOpener implements PrivilegedAction {
  12.    PrinterException pex;
  13.    OutputStream result;
  14.    // $FF: synthetic field
  15.    final PSPrinterJob this$0;
  16.  
  17.    private PSPrinterJob$PrinterOpener(PSPrinterJob var1) {
  18.       this.this$0 = var1;
  19.    }
  20.  
  21.    public Object run() {
  22.       try {
  23.          this.this$0.spoolFile = File.createTempFile("javaprint", ".ps", (File)null);
  24.          this.this$0.spoolFile.deleteOnExit();
  25.          this.result = new FileOutputStream(this.this$0.spoolFile);
  26.          return this.result;
  27.       } catch (IOException var2) {
  28.          this.pex = new PrinterIOException(var2);
  29.          return null;
  30.       }
  31.    }
  32.  
  33.    // $FF: synthetic method
  34.    PSPrinterJob$PrinterOpener(PSPrinterJob var1, PSPrinterJob.1 var2) {
  35.       this(var1);
  36.    }
  37. }
  38.